package com.hyyt.shopjsp.wxmg.publicNo.controller;

import com.hyyt.shopjsp.basic.pojo.BasicKeyBook;
import com.hyyt.shopjsp.common.controller.BaseController;
import com.hyyt.shopjsp.util.common.ResultMsg;
import com.hyyt.shopjsp.util.common.StringStaticKey;
import com.hyyt.shopjsp.util.common.Utils;
import com.hyyt.shopjsp.util.json.FastJsonUtils;
import com.hyyt.shopjsp.util.redis.util.RedisDataReadUtil;
import com.hyyt.shopjsp.util.wxpay.GetStreamParameter;
import com.hyyt.shopjsp.wxmg.basicInfo.pojo.WxGlobalReturnCode;
import com.hyyt.shopjsp.wxmg.fansMessage.pojo.*;
import com.hyyt.shopjsp.wxmg.fansMessage.service.*;
import com.hyyt.shopjsp.wxmg.publicNo.service.IWxOpenCommonService;
import com.hyyt.shopjsp.wxmg.publicNo.service.IWxPublicNoInfoService;
import com.hyyt.shopjsp.wxmg.util.WxResponseInfo;
import com.hyyt.shopjsp.wxmg.util.WxXmlToJavaBean;
import org.apache.log4j.Logger;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 微信对外响应Controller
 *
 * @author
 *
 */
@Controller
@RequestMapping("/open/wx/common")
public class WxOpenCommonController extends BaseController {

	private Logger logger = Logger.getLogger(WxOpenCommonController.class);

    /**
     * WX_微信对外响应
     */
    @Resource
    private IWxOpenCommonService wxOpenCommonService;

    /**
     * 微信响应认证，微信响应
     */
    @RequestMapping("wxTokenVerification")
    @ResponseBody
    public void wxTokenVerification(HttpServletRequest request, HttpServletResponse response, String echostr) {
        Map<String,Object> params = wxOpenCommonService.wxTokenVerification(request,response,echostr);
        ResultMsg.create(params, response);  //把内容发送到页面
	}

}
